<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
use Spatie\EloquentSortable\Sortable;
use Spatie\EloquentSortable\SortableTrait;

class Option extends Model implements Sortable
{
    use HasDateTimeFormatter;
    use SoftDeletes;
    use SortableTrait;

    protected $sortable = [
        // 设置排序字段名称
        'order_column_name' => 'sort',
        // 是否在创建时自动排序，此参数建议设置为true
        'sort_when_creating' => true,
    ];

    public static $type_text = [
        'income' => '收入',
        'education' => '学历',
        'province' => '省',
        'city' => '城市',
        'college' => '学院',
        'constellation' => '星座',
        'family' => '家庭标签',
        'keyword' => '关键词',
        'college_tab' => '学院标签',
        'face_score' => '颜值标签',
        'carandhouse' => '车房标签',
        'marital_status' => '婚姻状况',
    ];
}
